/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package android.components;

import android.graphics.Bitmap;
import android.graphics.Canvas;

/**
 *
 * @author Tew
 */
public abstract class Glove {

    private Bitmap bitmap;
    private float x;
    private float y;

    public Glove(Bitmap img, float x, float y) {
        this.bitmap = img;
        this.x = x;
        this.y = y;
    }

    abstract void rotate();

    public Bitmap getBitmap() {
        return bitmap;
    }

    public void setBitmap(Bitmap bitmap) {
        this.bitmap = bitmap;
    }

    public float getX() {
        return x;
    }

    public void setX(float x) {
        this.x = x;
    }

    public float getY() {
        return y;
    }

    public void setY(float y) {
        this.y = y;
    }

    public void draw(Canvas canvas) {
        canvas.drawBitmap(bitmap, x - (bitmap.getWidth() / 2), y - (bitmap.getHeight() / 2), null);
    }

    public void update(float x, float y) {
        this.x = x;
        this.y = y;
    }
}
